<?php
/**
 * Created by PhpStorm.
 * User: qingyun
 * Date: 19/5/8
 * Time: 上午9:45
 */

namespace Model;
class User
{

    protected $pdo;

    public function __construct()
    {
        $this->pdo = new \PDO('mysql:host=127.0.0.1;dbname=php', 'root', '123456');
    }

    public function select()
    {
        $res = $this->pdo->query('select * from user');

        return $res->fetchAll(\PDO::FETCH_ASSOC);
    }

}